---
import Layout from "../layout/Layout.astro";
---

<Layout>
<button id="bad-button">Click me to add an image that is missing an alt!</button>
<a id="link-to-2" href="/audits-mutations-2">Go to Mutations 2</a>

<img src="" width="100" height="100" />

<script>
	document.addEventListener('astro:page-load', () => {
		const badButton = document.getElementById('bad-button');
		if (!badButton) return;

		badButton.addEventListener('click', clickHandler);

		function clickHandler() {
			const img = document.createElement('img');
			img.width = 100;
			img.height = 100;

			document.body.appendChild(img);
			console.log("Image added to the page")
		}
	})
</script>
</Layout>
